package cn.com.justing.pigeon.shortener;

import java.net.MalformedURLException;


import junit.framework.TestCase;

public class IsGdLinkShortenerTest extends TestCase
{
	LinkShortener shortener;

	protected void setUp() throws Exception
	{
		super.setUp();
		shortener = new IsGdLinkShortener();
	}

	public void testShortenLinkURL() throws MalformedURLException
	{
		assertEquals("http://is.gd/b0g3x", shortener
				.shortenLink("http://www.google.com"));
		assertEquals("http://is.gd/b0gVs", shortener
				.shortenLink("http://www.baidu.com"));
	}

	public void testShortenLinkString()
	{
		assertEquals("http://is.gd/b0g3x", shortener
				.shortenLink("http://www.google.com"));
	}

}
